import request from '@/utils/request'

// 查询生产任务-明细列表
export function listTaskDetails(query) {
  return request({
    url: '/mes/taskDetails/list',
    method: 'get',
    params: query
  })
}

// 查询指定生产任务下的所有工序
export function listTaskDetailsByTaskUuid(query) {
  return request({
    url: '/mes/taskDetails/listByTaskUuid',
    method: 'get',
    params: query
  })
}

// 查询生产任务-明细详细
export function getTaskDetails(taskDetailUuid) {
  return request({
    url: '/mes/taskDetails/' + taskDetailUuid,
    method: 'get'
  })
}

// 新增生产任务-明细
export function addTaskDetails(data) {
  return request({
    url: '/mes/taskDetails',
    method: 'post',
    data: data
  })
}

// 修改生产任务-明细
export function updateTaskDetails(data) {
  return request({
    url: '/mes/taskDetails',
    method: 'put',
    data: data
  })
}

// 删除生产任务-明细
export function delTaskDetails(taskDetailUuid) {
  return request({
    url: '/mes/taskDetails/' + taskDetailUuid,
    method: 'delete'
  })
}
